Position detecting apparatus, lens apparatus, position detecting method, and storage medium

ABSTRACT

A position detecting apparatus includes a signal detecting unit that detects a plurality of periodic signals, a correction unit configured to correct the plurality of periodic signals using a correction value to generate a plurality of correction signals, a first calculating unit configured to generate a plurality of displacement signals based on the plurality of correction signals and to calculate the position based on the plurality of displacement signals, a second calculating unit configured to calculate a reliability based on the plurality of displacement signals, and a correction value adjusting unit configured to adjust the correction value based on the reliability. The second calculating unit calculates a first reliability corresponding to a first correction value and a second reliability corresponding to a second correction value, and changes the first correction value to the second correction value when the second reliability is higher than the first reliability.

BACKGROUND OF THE INVENTION Field of the Invention

The present invention relates to a position detecting apparatus thatdetects a position of an object.

Description of the Related Art

A conventional absolute encoder (position detecting apparatus) candetect an (absolute) position of an object. The absolute encoderconverts, for example, a two-phase sine wave signal that changes withthe position of the object acquired from a sensor into an absoluteposition signal. However, as the amplitude or offset of the two-phasesine wave signal varies, the reliability of the absolute position signallowers.

Japanese Patent Laid-Open No. 2002-372437 discloses an offset correctingcircuit that corrects an encoder offset by feeding back an offset errorto a two-phase sine wave signal. Japanese Patent No. 4581953 discloses acorrection circuit of an encoder output signal for calculating theamplitude and offset based on a peak value of a signal and for correctthe amplitude and offset.

However, the offset correcting circuit disclosed in Japanese PatentLaid-Open No. 2002-372437 needs to add a circuit for feedback, andincreases the cost. On the other hand, the correction circuit for theencoder output signal disclosed in Japanese Patent No. 4581953 correctsa signal using a correction value calculated based on the peak value ofthe signal, and thus needs no feedback. However, the correction circuitdisclosed in Japanese Patent No. 4581953 needs to change the position ofthe object in order to obtain the peak value of the signal. Hence, it isdifficult to calculate the correction value during normal use or whilethe position of the object cannot be changed, and the reliability(accuracy) of the absolute position signal cannot always be maintained.

SUMMARY OF THE INVENTION

The present invention provides a position detecting apparatus, a lensapparatus, a position detecting method, and a storage medium, each ofwhich can inexpensively maintain a detection accuracy of a position ofan object.

A position detecting apparatus according to one aspect of the presentinvention includes a signal detecting unit configured to detect aplurality of periodic signals relating to a position of an object, acorrection unit configured to correct the plurality of periodic signalsusing a correction value to generate a plurality of correction signals,a first calculating unit configured to generate a plurality ofdisplacement signals based on the plurality of correction signals and tocalculate the position based on the plurality of displacement signals, asecond calculating unit configured to calculate a reliability based onthe plurality of displacement signals; and a correction value adjustingunit configured to adjust the correction value based on the reliability.The second calculating unit calculates a first reliability correspondingto a first correction value and a second reliability corresponding to asecond correction value. The correction value adjusting unit changes thefirst correction value to the second correction value when the secondreliability is higher than the first reliability.

A lens apparatus according to another aspect of the present inventionincludes an optical element, and the above position detecting apparatusconfigured to detect a position of the optical element.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a position detecting apparatus according toa first embodiment.

FIG. 2 is a sectional view of an ABS sensor according to the firstembodiment.

FIG. 3 is a plan view of a scale portion according to the firstembodiment.

FIG. 4 is a plan view of a light receiving unit according to the firstembodiment.

FIG. 5 is a flowchart showing an operation of the position detectingapparatus according to the first embodiment.

FIG. 6 is a flowchart showing absolute position calculating processingaccording to the first embodiment.

FIGS. 7A to 7D are signal graphs according to the first embodiment.

FIGS. 8A to 8D are graphs showing a change in a signal waveform due to asynchronization calculation according to the first embodiment.

FIGS. 9A and 9B are graphs showing the reliability according to thefirst embodiment.

FIGS. 10A and 10B are graphs showing determination criteria for thereliability according to the first embodiment.

FIG. 11 is a flowchart of correction value adjusting processingaccording to the first embodiment.

FIG. 12 is a flowchart of offset correction value adjusting processingaccording to the first embodiment.

FIG. 13 is a graph showing determination criteria for the correctionvalue adjustment according to the first embodiment.

FIGS. 14A and 14B are graphs showing a decrease in the reliabilityaccording to the first embodiment.

FIG. 15 is a graph showing a relationship between the reliability andthe adjustment value according to the first embodiment.

FIG. 16 is a flowchart of offset correction value adjusting processingaccording to a second embodiment.

FIG. 17 is a flowchart of offset correction value adjusting processingaccording to a third embodiment.

FIG. 18 is a graph showing a prediction of an offset correction valueaccording to the third embodiment.

FIG. 19 is a sectional view of an ABS sensor according to a fourthembodiment.

FIG. 20 is a plan view of a scale portion according to the fourthembodiment.

FIG. 21 is a flowchart showing the operation of the position detectingapparatus according to the fourth embodiment.

FIG. 22 is a flowchart showing absolute position calculating processingaccording to the fourth embodiment.

FIGS. 23A to 23F are signal graphs according to the fourth embodiment.

FIG. 24 is a flowchart of correction value adjusting processingaccording to the fourth embodiment.

FIG. 25 is a flowchart of offset correction value adjusting processingaccording to the fourth embodiment.

FIG. 26 is a configuration diagram of an imaging apparatus according toa fifth embodiment.

DESCRIPTION OF THE EMBODIMENTS

Referring now to the accompanying drawings, a detailed description willbe given of embodiments according to the present invention.

First Embodiment

Referring now to FIGS. 1 to 15, a description will be given of aposition detecting apparatus according to a first embodiment of thepresent invention. FIG. 1 is a block diagram of a position detectingapparatus 100 according to this embodiment. An ABS calculating unit(first calculating unit) 102 calculates a position Pabs as an absoluteposition of a movable element (movable member or object) relative to thefixed element (fixed member) based on a signal output from the ABSsensor (signal detecting unit) 104. A detailed description of a methodfor calculating the absolute position Pabs will be given later.

A scale switching unit 103 switches two types of signal outputs based ontwo types of track patterns and sequentially outputs them from an ABSsensor 104. The ABS sensor 104 is a detection sensor that outputs asignal corresponding to the absolute position of the movable elementrelative to the fixed element. Herein, ABS stands for an absoluteposition. An internal configuration and output signal of the ABS sensor104 will be described later. An A/D converter 105 converts an analogsignal output from the ABS sensor 104 into a digital signal. Acorrection unit 106 corrects a signal converted into the digital signalby the A/D converter 105, based on a correction value stored in a datastorage 107. A detailed description of the correction by the correctionunit 106 and the correction value will be given later. A reliabilitycalculating unit (second calculating unit) 108 calculates a reliabilityMgn that is the reliability of the absolute position Pabs calculated bythe ABS calculating unit 102. The reliability will be described indetail later. The data storage 107 is a nonvolatile memory, such as aEEPROM, which stores and saves the signal converted into the digitalsignal by the A/D converter 105, the correction value, and thereliability Mgn calculated by the reliability calculating unit 108.

The ABS determining unit (position determining unit) 101 requests theABS calculating unit 102 to calculate the absolute position Pabs, anddetermines the absolute position Pabs calculated by the ABS calculatingunit 102 based on the reliability Mgn calculated by the reliabilitycalculating unit 108. The correction value adjusting unit 109 adjuststhe correction value stored in the data storage 107, based on thereliability Mgn calculated by the reliability calculating unit 108. Thecorrection value adjustment will be described in detail later. In thisembodiment, the ABS determining unit 101, the ABS calculating unit 102,the correction unit 106, the reliability calculating unit 108, and thecorrection value adjusting unit 109 can constitute a single CPU or aplurality of CPUs.

Next follows a description will be given of the internal configurationand output signal of the ABS sensor 104. FIG. 2 is a sectional view ofthe ABS sensor 104. In FIG. 2, a movable element 21 is movable memberthat is movable in a direction perpendicular to the paper surface(X-axis direction). A fixed element 22 is an element that serves as areference for the absolute position of the movable element 21. A lightsource 201 includes a light emitting unit, such as an LED. A scale unit202 has two track patterns 203 a and 203 b that are equally spaced withdifferent numbers of slits over the overall length. Light receivingunits 204 a and 204 b receive light from the light source 201 reflectedby the track patterns 203 a and 203 b, respectively, and are configuredby, for example, a photodiode array.

A signal processing circuit 205 processes the signals received by thelight receiving units 204 a and 204 b, and outputs one of the trackpatterns 203 a and 203 b in accordance with the switching signal of thescale switching unit 103. In this embodiment, the movable element 21 hasthe scale unit 202, and the fixed element 22 has the light source 201and the light receiving units 204 a and 204 b, but the present inventionis not limited to this embodiment. For example, the scale unit 202 maybe provided onto the fixed element 22, and the light source 201 and thelight receiving units 204 a and 204 b may be provided onto the movableelement 21. This also applies to the second embodiment and the thirdembodiment described later.

FIG. 3 is a plan view of the scale unit 202 according to thisembodiment. Although FIG. 3 illustrates a reflective slit pattern as anexample, another configuration, such as a transmission type slitpattern, may be employed. The scale unit 202 includes two track patternsor a track pattern (first track pattern) 203 a and a track pattern(second track pattern) 203 b. Reflectors in the track pattern 203 a arearranged at regular intervals P1. Reflectors in the track pattern 203 bare arranged at regular intervals P2. When light emitted from the lightsource 201 enters the reflectors in the track patterns 203 a and 203 b,the light is reflected toward the light receiving units 204 a and 204 b,respectively. In this embodiment, the interval P1 is configured so thatthere are 40 reflectors for the overall length of the scale or 40periods for the overall length Lmax. The interval P2 is configured suchthat there are 39 reflectors for the overall length of the scale or 39Periods for the overall length Lmax.

FIG. 4 is a plan view of the light receiving unit 204 a. The lightreceiving unit 204 b is configured similar to the light receiving unit204 a. In the light receiving unit 204 a, 16 photodiodes 401 to 416 arearranged at regular intervals in the horizontal direction. Thephotodiodes 401, 405, 409, and 413 are electrically connected, and thisset will be referred to as a phase. A set of the photodiodes 402, 406,410, and 414 will be referred to as a b-phase. Similarly, a set ofphotodiodes 403, 407, 411, and 415 will be referred to as a c-phase, anda set of photodiodes 404, 408, 412, and 416 will be referred to as ad-phase.

A description in this embodiment premises that an interval of the fourphotodiodes in the light receiving unit 204 a (such as an intervalbetween the photodiodes 401 to 404) is twice as long as the interval P1between the reflectors of the track pattern 203 a. Herein, since adouble distance from the light source 201 to the reflector of the trackpattern 203 a is equal to a distance from the light source 201 to thelight receiving unit 204 a, the width of the reflected light received bythe light receiving unit 204 a is twice as wide as the width of thereflector. Thus, the interval of the four photodiodes in the lightreceiving unit 204 a (such as the interval between the photodiodes 401to 404) corresponds to one period of the pattern of the track pattern203 a.

When the light from the light source 201 reflected by the track pattern203 a is received by the light receiving unit 204 a, each of thea-phase, b-phase, c-phase, and d-phase photodiode groups outputs thecurrent corresponding to the received light amount. As the scale portion202 moves in the X-axis direction, each of the a-phase, b-phase,c-phase, and d-phase photodiode groups output the fluctuating currentssuch that there is a phase relationship of 90° between the b-phase andthe a-phase, a phase relationship of 180° between the c-phase and thea-phase, and a phase relationship of 270° between the d-phase and thea-phase.

The signal processing circuit 205 converts the output current into avoltage with a current-voltage converter. Then, the signal processingcircuit 205 calculates each of a differential component between thea-phase and the c-phase and a differential component between the b-phaseand the d-phase, using a differential amplifier. Next, the signalprocessing circuit 205 generates an first a-phase displacement signal S1rA as a-phase displacement signal and a first b-phase displacementsignal S1 rB as a b-phase displacement signal of the track pattern 203 awhich shift in phase by 90° based on the differential component betweenthe a-phase and the c-phase and the differential component between theb-phase and the d-phase.

In the similar manner, the light receiving unit 204 b generates thesecond a-phase displacement signal S2 rA, which is the a-phasedisplacement signal of the track pattern 203 b, and the second b-phasedisplacement signal S2 rB, which is the b-phase displacement signal. Thesignal processing circuit 205 outputs the first a-phase displacementsignal S1 rA and the first b-phase displacement signal S1 rB or thesecond a-phase displacement signal S2 rA and the second b-phasedisplacement signal S2 rB in accordance with the switching signal fromthe scale switching unit 103. As described above, the ABS sensor 104outputs the first a-phase displacement signal S1 rA and the firstb-phase displacement signal S1 rB, or the second a-phase displacementsignal S2 rA and the second b-phase displacement signal S2 rB inaccordance with the switching signal from the scale switching unit 103.

Next follows a description of an operation of the position detectingapparatus 100 according to this embodiment. FIG. 5 is a flowchartshowing the operation of the position detecting apparatus 100. Each stepin FIG. 5 is executed by each unit of the position detecting apparatus100.

First, in the step S501, this flow starts. This flow (absolute positionPabs determining processing) is started when the ABS determining unit101 requests the ABS calculating unit 102 to calculate the absoluteposition Pabs. Next, in the step S502, the ABS calculating unit 102outputs a first switching signal for switching to the first scale (trackpattern 203 a) to the scale switching unit 103. In response to the firstswitching signal, the scale switching unit 103 instructs the ABS sensor104 to output the signal of the track pattern 203 a. The ABS sensor 104outputs the first a-phase displacement signal S1 rA and the firstb-phase displacement signal S1 rB. The first a-phase displacement signalS1 rA and the first b-phase displacement signal S1 rB are converted intodigital signals by the A/D converter 105 and output to the ABScalculating unit 102.

Next, in the step S503, the correction unit 106 acquires the signallevel V1 rA of the first a-phase displacement signal S1 rA and thesignal level V1 rB of the first b-phase displacement signal S1 rB at theexecution timing T1 of the step S503 output from the A/D converter 105.At the same time, the data storage 107 stores the signal level V1 rA ofthe first a-phase displacement signal S1 rA and the signal level V1 rBof the first b-phase displacement signal S1 rB.

Next, in the step S504, the correction unit 106 corrects the signallevel V1 rA of the first a-phase displacement signal S1 rA and thesignal level V1 rB of the first b-phase displacement signal S1 rB at theexecution timing T1. Herein, the first a-phase displacement signal S1 rAand the first b-phase displacement signal S1 rB may have mutuallydifferent amplitudes and offsets. Hence, if the absolute position iscalculated without correcting the signals, the calculated absoluteposition Pabs contains an error. Thus, a signal correction is required.

In this embodiment, as described above, the interval of the fourphotodiodes in the light receiving unit 204 a (such as the intervalbetween the photodiodes 401 to 404) is twice as long as the interval P1between the reflectors in the track pattern 203 a. Accordingly, thefirst a-phase displacement signal S1 rA and the first b-phasedisplacement signal S1 rB are respectively expressed by the followingexpressions (1) and (2).

S1rA:a1×COS θ+s1  (1)

S1rB:a2×SIN θ+s2  (2)

In the expressions (1) and (2), a1 and s1 are the amplitude and offsetof the first a-phase displacement signal S1 rA, a2 and s2 are theamplitude and offset of the first b-phase displacement signal S1 rB, andθ is the phase of the signal. The maximum value of the first a-phasedisplacement signal S1 rA is s1+a1, the minimum value is s1-a1, thesignal amplitude is a1, and the average value is s1. Similarly, themaximum value of the first b-phase displacement signal S1 rB is s2+a2,the minimum value is s2-a2, the signal amplitude is a2, and the averagevalue is s2. a1 and a2 are an amplitude correction value A1 of the firsta-phase displacement signal S1 rA and an amplitude correction value A2of the first b-phase displacement signal S1 rB, respectively, and storedin the data storage 107. Further, s1 and s2 are an offset correctionvalue S1 of the first a-phase displacement signal S1 rA and an offsetcorrection value S2 of the first b-phase displacement signal S1 rB,respectively, and stored in the data storage 107.

The first a-phase displacement signal S1 rA and the first b-phasedisplacement signal S1 rB represented by the expressions (1) and (2) arecorrected with the correction values A1, A2, S1, and S2. Corrected firsta-phase displacement signal S1 cA and first b-phase displacement signalS1 cB are respectively expressed by the following expressions (3) and(4).

S1cA:{(a1×COS θ+s1)−s1}×a2=a1×a2×COS θ  (3)

S1cB:{(a2×SIN θ+s2)−s2}×a1=a1×a2×SIN θ  (4)

As a result, the offsets s1 and s2 of the first a-phase displacementsignal S1 rA and the first b-phase displacement signal S1 rB areeliminated, and the first a-phase displacement signal S1 cA and thefirst b-phase displacement signal S1 cB having the same amplitudes areobtained. As described above, the first a-phase displacement signal S1rA and the first b-phase displacement signal S1 rB are corrected in thestep S504, and the flow proceeds to the step S505.

In the step S505, the ABS calculating unit 102 outputs a secondswitching signal for switching to the second scale (track pattern 203 b)to the scale switching unit 103. In response to the second switchingsignal, the scale switching unit 103 instructs the ABS sensor 104 tooutput the signal of the track pattern 203 b. The ABS sensor 104 outputsa second a-phase displacement signal S2 rA and a second b-phasedisplacement signal S2 rB. The second a-phase displacement signal S2 rAand the second b-phase displacement signal S2 rB are converted intodigital signals by the A/D converter 105 and output to the correctionunit 106.

Next, in the step S506, the correction unit 106 acquires the signallevel V2 rA of the second a-phase displacement signal S2 rA and thesignal level V2 rB of the second b-phase displacement signal S2 rB atthe execution timing T2 of the step S506 output from the A/D converter105. At the same time, the data storage 107 stores the signal level V2rA of the second a-phase displacement signal S2 rA and the signal levelV2 rB of the second b-phase displacement signal S2 rB.

Next, in the step S507, the correction unit 106 corrects the signallevel V2 rA of the second a-phase displacement signal S2 rA and thesignal level V2 rB of the second b-phase displacement signal S2 rB atthe execution timing T2. Since the light receiving unit 204 b isconfigured similar to the light receiving unit 204 a, the interval ofthe four photodiodes in the light receiving unit 204 b (such as theinterval between the photodiodes 401 to 404) is as twice as the intervalP1 between the reflectors in the track pattern 203 a. The interval P1between the reflectors in the track pattern 203 a and the interval P2between the reflectors in the second track pattern 203 b are differentfrom each other. Hence, the interval of the four photodiodes in thelight receiving unit 204 b (such as the interval between the photodiodes401 to 404) is not twice as long as the interval P2 between thereflectors in the track pattern 203 b. Hence, the second a-phasedisplacement signal S2 rA and the second b-phase displacement signal S2rB have a phase relationship shifted from 90°.

The second a-phase displacement signal S2 rA and the second b-phasedisplacement signal S2 rB are respectively expressed by the followingexpressions (5) and (6).

S2rA:b1×COS θ+t1  (5)

S2rB:b2×SIN(θ+α)+t2  (6)

In the expressions (5) and (6), b1 and t1 are the amplitude and offsetof the second a-phase displacement signal S2 rA, b2 and t2 are theamplitude and offset of the second b-phase displacement signal S2 rB, θis the signal, and α is a shift amount of the phase. b1 and b2 are theamplitude correction value B1 of the second a-phase displacement signalS2 rA and the amplitude correction value B2 of the second b-phasedisplacement signal S2 rB, respectively, and stored in the data storage107. t1 and t2 are the offset correction value T1 of the second a-phasedisplacement signal S2 rA and the offset correction value T2 of thesecond b-phase displacement signal S2 rB, respectively, and stored inthe data storage 107.

The second a-phase displacement signal S2 rA and the second b-phasedisplacement signal S2 rB represented by the expressions (5) and (6) arecorrected with the correction values B1, B2, T1, and T2. The correctedsecond a-phase displacement signal S2 cA′ and second b-phasedisplacement signal S2 cB′ are respectively expressed by the followingexpressions (7) and (8).

S2cA′:((b1×COS θ+t1)−t1)×b2=b1×b2×COS θ  (7)

S2cB′:{(b2×SIN(θ+α)+t2)−t2}×b1=b1×b2×SIN(θ+α)  (8)

As a result, the second a-phase displacement signal S2 cA′ and thesecond b-phase displacement signal S2 cB′ having the same amplitudes inwhich the offsets t1 and t2 of the second a-phase displacement signal S2rA and the second b-phase displacement signal S2 rB are eliminated.

Next follows a description of processing that sets the phase differencebetween the second a-phase displacement signal S2 cA′ and the secondb-phase displacement signal S2 cB′ to 90° using the expressions (7) and(8). The difference and sum of the expressions (7) and (8) arerespectively expressed as in the following expressions (9) and (10).

b1×b2×(SIN(θ+α)−COS θ)=b1×b2×2×SIN((α−90)/2×COS {θ+(α+90)/2}  (9)

b1×b2×{(SIN(θ+α)+COS θ)=b1×b2×2×COS}(α−90)/2}×SIN {θ+(α+90)/2}  (10)

From the above, the phase difference between the expressions (9) and(10) is 90°. Since the amplitudes of the expressions (9) and (10) aredifferent from each other, the amplitude is next corrected, and thesecond a-phase displacement signal S2 cA and the second b-phasedisplacement signal S2 cB having the same amplitudes are calculated.

When the expression (9) is multiplied by COS {(α−90)/2} which is part ofthe amplitude of the expression (10) and the expression (10) ismultiplied by SIN {(α−90)/2} which is part of the amplitude of theexpression (9), the following expressions (11) and (12) are obtained.

S2cA:b1×b2×2×SIN {(α−90)/2}×COS {(α−90)/2}×COS {θ+(α+90)/2}  (11)

S2cB:b1×b2×2×SIN {(α−90)/2}×COS {(α−90)/2}×SIN {θ+(α+90)/2}  (12)

As a result, the second a-phase displacement signal S2 cA and the secondA second b-phase displacement signal S2 cB having the same amplitudesand the phase difference of 90° are obtained in which the offsets of thesecond a-phase displacement signal S2 rA and the second b-phasedisplacement signal S2 rB are eliminated. As described above, when thesecond a-phase displacement signal S2 rA and the second b-phasedisplacement signal S2 rB are corrected in the step S507, the flowproceeds to the step S508.

In the step S508, the ABS calculating unit 102 calculates the absoluteposition Pabs based on the first a-phase displacement signal S1 cA, thefirst b-phase displacement signal S1 cB, the second a-phase displacementsignal S2 cA, and the second b-phase displacement signal S2 cBcalculated by the correction unit 106. The absolute position calculatingprocessing will be described in detail later. Next, in the step S509,the reliability calculating unit 108 calculates a reliability Mgn thatis a parameter indicating the reliability of the absolute position Pabscalculated in the step S508. The reliability calculation will bedescribed in detail later. The data storage 107 stores the reliabilityMgn.

Next, in the step S510, the reliability calculating unit 108 determinesthe reliability of the absolute position Pabs calculated in the stepS508 based on the reliability Mgn calculated in the step S509. If it isdetermined that the reliability is high, the flow proceeds to the stepS512. On the other hand, if it is determined that the reliability islow, the flow proceeds to the step S511. The absolute positionreliability determination will be described in detail later.

In the step S511, an abnormality notifying unit (not shown) such as anLED notifies the user of the abnormality, and flow proceeds to the stepS512. In the step S512, the correction value adjusting unit 109 performscorrection value adjusting processing, and proceeds to step S513. Thecorrection value adjusting processing will be described in detail later.In the step S513, this flow ends. According to this flow, the ABSdetermining unit 101 determines the absolute position Pabs calculated bythe ABS calculating unit 102, as the absolute position (position of theobject) of the movable element 21.

Referring now to FIGS. 6 and 7A to 7D, a description will be given ofthe absolute position calculating processing (step S508). FIG. 6 is aflowchart showing the absolute position calculating processing(calculation processing for the absolute position Pabs). Each step inFIG. 6 is executed by the ABS calculating unit 102. FIGS. 7A to 7D aregraphs of each signal. FIG. 7A is a signal Atan1, FIG. 7B is a firstrelative position signal Inc1, FIG. 7C is a second relative positionsignal Inc2, and FIG. 7D illustrates the Vernier signal Pv1. In each ofFIGS. 7A to 7D, the abscissa axis indicates the position for the overalllength of the scale, and the ordinate axis indicates the signal level.

First, in the step S601, the flow starts. Next, in the step S602, theABS calculating unit 102 calculates a first relative position signalInc1 having an amplitude Vmax and 40 periods for the overall length ofthe scale as illustrated in FIG. 7B using the corrected first a-phasedisplacement signal S1 cA and first b-phase displacement signal S1 cB.

First, the ABS calculating unit 102 performs an arctangent calculationusing the corrected first a-phase displacement signal S1 cA and firstb-phase displacement signal S1 cB, and calculates the signal Atan1illustrated in FIG. 7A. The track pattern 203 a is a pattern having 40periods for the overall length of the scale. Therefore, the signal Atan1has 80 periods for the overall length of the scale.

Next, the ABS calculating unit 102 calculates a first relative positionsignal Inc1 having the amplitude Vmax and 40 periods for the overalllength of the scale based on the signal Atan1. The first relativeposition signal Inc1 is calculated by multiplying a gain to the Atan1signal so that the amplitude of the signal Atan1 becomes Vmax/2, bysetting to 0 the signal level when the phase of the first b-phasedisplacement signal S1 rB is 0°, and by adding Vmax/2 to the result whenthe phase is 180° to 360°. Thus, the first relative position signal Inc1is a sawtooth wave having 40 periods for the overall length of the scaleas illustrated in FIG. 7B. The ABS calculating unit 102 calculates thefirst relative position signal Inc1 that is a one-to-one correspondencewith the phase of the track pattern 203 a having the interval P1. Asdescribed above, in the step S602, a signal level V1inc1 of the firstrelative position signal Inc1 at the execution timing T1 is calculatedfrom the first a-phase displacement signal S1 cA and the first b-phasedisplacement signal S1 cB at the execution timing T1, and the flowproceeds to the step S603.

In the step S603, the ABS calculating unit 102 performs the samecalculation similar to the step S602 using the corrected second a-phasedisplacement signal S2 cA and second b-phase displacement signal S2 cB,and calculates the second relative position signal Inc2. The trackpattern 203 b is a pattern having 39 periods for the overall length ofthe scale. Thus, the second relative position signal Inc2 becomes asawtooth wave having 39 periods for the overall length of the scale asillustrated in FIG. 7C. Hence, the ABS calculating unit 102 calculatesthe second relative position signal Inc2 that corresponds one-to-one tothe phase of the track pattern 203 b having the interval P2. Asdescribed above, in the step S603, a signal level V2inc2 of the secondrelative position signal Inc2 at the execution timing T2 is calculated,and the flow proceeds to the step S604.

In the step S604, the ABS calculating unit 102 calculates a Verniersignal Pv1 based on the signal level V1inc1 of the first relativeposition signal Inc1 at the execution timing T1 and the signal levelV2inc2 of the second relative position signal Inc2 at the executiontiming T2. The Vernier signal Pv1 calculated at this time is illustratedin FIG. 7D. The Vernier signal Pv1 is obtained by calculating adifference between the signal level V1inc1 of the first relativeposition signal Inc1 and the signal level V2inc2 of the second relativeposition signal Inc2, and by adding the amplitude Vmax to it when thedifference is a negative value. Here, since the difference in the periodis 1 for the overall length Lmax of the first relative position signalInc1 and the second relative position signal Inc2, the Vernier signalPv1 becomes a sawtooth wave having one period for the overall lengthLmax as illustrated in FIG. 7D. When the Vernier signal Pv1 iscalculated in the step S604, the flow proceeds to the step S605.

In the step S605, the ABS calculating unit 102 calculates the absoluteposition Pabs. A method of calculating the absolute position Pabs willbe described in detail later. The first a-phase displacement signal S1rA, the first b-phase displacement signal S1 rB, the second a-phasedisplacement signal S2 rA, and the second b-phase displacement signal S2rB include error components. Hence, the first relative position signalInc1 and the second relative position signal Inc2 calculated from thesesignals also contain error components. In order to correct (reduce)these error components, the ABS calculating unit 102 performs asynchronization operation between the Vernier signal Pv1 and the firstrelative position signal Inc1. The synchronization calculation will bedescribed in detail later. A signal synthesized using the Vernier signalPv1 that is a higher signal and the first relative position signal Inc1that is a lower signal is calculated as the signal Vabs indicating theabsolute position. The signal Vabs indicating the absolute position willbe described in detail later.

Referring now to FIGS. 8A to 8D, a description will be given of thesynchronization calculation. FIGS. 8A to 8D are graphs showing changesin the signal waveforms due to the synchronization calculation. In FIGS.8A to 8D, the abscissa axis indicates the position in the overall lengthof the scale, and the ordinate axis indicates the signal level. Themaximum value of the signal level is the amplitude Vmax. N1 indicatesthe number of periods of the region counting from the scale startingpoint, and the number of periods in the overall length Lmax is definedas N1max. In this embodiment, since the track pattern 203 a has 40periods for the overall length of the scale, N1max is 40 and N1 is anatural number from 1 to 40.

FIG. 8A illustrates waveforms of Inc1, Pv1, and Inc1/N1max. When adifference between Pv1 and Inc1/N1max having the same slope as that ofPv1 is calculated, a stepped waveform having an error component Eillustrated in FIG. 8B is generated. A signal Vb′ having a waveformillustrated in FIG. 8B is expressed by the following expression (13).Here, the signal level of one step of the stepped waveform isVmax/N1max.

Vb′=Pv1−(Inc1/N1 max)  (13)

Next, when the error component E of the waveform illustrated in FIG. 8Bis removed by rounding off, a waveform illustrated in FIG. 8C isobtained. The signal Vb having the waveform illustrated in FIG. 8C isexpressed by the following expression (14).

Vb=Round[Vb′×(N1max/Nmax)]×(Vmax/N1max)  (14)

In the expression (14), Round[ ] is a function that rounds off the firstdecimal place. The error component E can be expressed as the followingexpression (15).

E=Vb′−Vb  (15)

By adding the waveform of Inc1/N1max to the waveform illustrated in FIG.8C, as illustrated in FIG. 8D, the signal Vabs indicating the absoluteposition from which the error component E has been eliminated isgenerated.

This synchronization calculation is performed by the calculationrepresented by the following expression (16).

Vabs=Vb+(Inc1/N1 max)  (16)

Using the signal Vabs indicating the absolute position, the absoluteposition Pabs is expressed by the following expression (17).

Pabs=Vabs×(Lmax/Vmax)  (17)

As described above, in the step S605, the absolute position Pabs at theexecution timing T1 is calculated from the Vernier signal Pv1 and thesignal level V1inc1 of the first relative position signal Inc1 at theexecution timing T1. Then, the flow proceeds to the step S606 and ends.Thereby, the absolute position Pabs can be calculated.

Referring now to FIGS. 9A and 9B, a description will be given of thereliability Mgn and its calculation. FIG. 9A is a graph showing thereliability Mgn in a normal case. In FIGS. 9A and 9B, the abscissa axisindicates the overall length Lmax, and the ordinate axis indicates thereliability Mgn. The reliability Mgn is expressed by the followingexpression (18).

Mgn=(Vb′×(N1max/Vmax))−Round[Vb′×(N1max/Vmax)]  (18)

In other words, the reliability Mgn is fractional part that is roundedin the rounding function Round[ ] performed by the above expression(14). The reliability Mgn is expressed by the following expression (19)using the error component E.

Mgn=E×(N1 max/Vmax)  (19)

The closer to 0 the reliability Mgn is, the smaller the error componentE becomes, the higher the reliability becomes, and it is determined thatthe absolute position Pabs is correctly calculated. On the other hand,if the error component E increases, the reliability Mgn decreases asillustrated in FIG. 9B. When the reliability Mgn exceeds 0.5, the valueis converted into an adjacent value by rounding off in thesynchronization operation, and the reliability Mgn becomes around −0.5.In other words, when a phenomenon that crosses 0.5 and −0.5 occurs, thesynchronization calculation fails, and the absolute position Pabs iserroneously detected.

Referring now to FIGS. 10A and 10B, a description will be given of thereliability determination of the absolute position. FIGS. 10A and 10Billustrate the reliability Mgn (determination criteria) when theabsolute position reliability determination is applied to FIGS. 9A and9B, respectively. In FIGS. 10A and 10B, the abscissa axis represents thescale's overall length Lmax, and the ordinate axis represents thereliability Mgn. In this embodiment, the threshold (determinationcriterion) of the reliability Mgn is set to 0.4. When the reliabilityMgn is within ±0.4 (−0.4≤Mgn≤+0.4), it is determined that the absoluteposition Pabs is reliable. On the other hand, when the reliability Mgnexceeds±0.4 (Mgn<−0.4, Mgn>+0.4), it is determined that the absoluteposition Pabs is not reliable. In other words, a gray range N in FIGS.10A and 10B is an area where the absolute position Pabs is determined tobe unreliable.

As illustrated in FIG. 10A, the reliability Mgn does not fall within therange N in the normal operation. It is thus determined that the absoluteposition Pabs is reliable over the entire area. On the other hand, inFIG. 10B, there is a location where the reliability Mgn falls within therange N, and it is determined that the absolute position Pabs is notreliable at that location.

Next follows a description of the correction value adjusting processing.The correction value adjusting unit 109 adjusts the offset correctionvalues S and S2 of the first a-phase displacement signal S1 rA and theb-phase displacement signal S1 rB and the offset correction values T1and T2 of the second a-phase displacement signal S2 rA and the b-phasedisplacement signal S2 rB, which are stored in the data storage 107.FIG. 11 is a flowchart of the correction value adjusting processing(step S512). Each step in FIG. 11 is executed by the correction valueadjusting unit 109.

First, in the step S1101, the correction value adjusting processingstarts. Next, in the step S1102, the correction value adjusting unit 109adjusts the offset correction value S1 of the first a-phase displacementsignal S1 rA. The adjustment of the offset correction value S1 will bedescribed in detail later. Next, in the step S1103, the correction valueadjusting unit 109 adjusts the offset correction value S2 of the firstb-phase displacement signal S1 rB. Next, in the step S1104, thecorrection value adjusting unit 109 adjusts the offset correction valueT1 of the second a-phase displacement signal S2 rA. Next, in the stepS1105, the correction value adjusting unit 109 adjusts the offsetcorrection value T2 of the second b-phase displacement signal S2 rB.Then, the flow proceeds to the step S1105 and ends.

Next follows a detailed description of the adjustment of the offsetcorrection value S1. The offset correction values S2, T1, and T2 areadjusted in the same manner as that for the offset correction value S1,and thus a description thereof will be omitted. An illustrativedescription will be given of a change in the reliability Mgn when theoffset s1 of the first a-phase displacement signal S1 rA changes.

When the offset s1 changes, a difference from the offset correctionvalue S occurs in the signal correction of the first a-phasedisplacement signal S1 rA. This difference causes an error in thecorrected first a-phase displacement signal S1 cA. The signal Atan1 iscalculated by the arctangent calculation of the first a-phasedisplacement signal S1 cA and the first b-phase displacement signal S1cB. The first relative position signal Inc1 is calculated from thesignal Atan1. Thus, this error results in an error of the Vernier signalPv1 calculated from the first relative position signal Inc and thesecond relative position signal Inc2. Thus, the error component Eincreases in the synchronous calculation of the first relative positionsignal Inc and the Vernier signal Pv1, and consequently the reliabilityMgn decreases. In other words, the greater the difference is between theoffset s1 and the offset correction value S1, the lower the reliabilityMgn becomes, and the smaller the difference becomes, the higher thereliability Mgn becomes. The offset correction value S1 is adjustedusing such a relationship.

FIG. 12 is a flowchart of the offset correction value S1 adjustment.Each step in FIG. 12 is executed by the correction value adjusting unit109. First, in the step S1201, this process starts. Next, in the stepS1202, the correction value adjusting unit 109 acquires the offsetcorrection value S1 and the reliability Mgn stored in the data storage107. Next, in the step S1203, the correction value adjusting unit 109determines whether or not to start correction value adjustment based onthe reliability Mgn acquired in step S1202. If it is determined to startcorrection value adjustment, the flow proceeds to the step S1204. On theother hand, if it is determined that the correction value adjustment isnot started, the flow proceeds to the step S1209 and ends. Thecorrection value S1 adjustment determination will be described in detaillater.

In the step S1204, the correction value adjusting unit 109 calculates anadjustment value a. The adjustment value a calculation will be describedin detail later. Next, in the step S1205, the correction value adjustingunit 109 acquires the reliability Mgn′ with the offset correction valueS1′ obtained by changing the offset correction value S by the adjustmentvalue a. Obtaining the reliability Mgn′ will be described in detaillater. Next, in the step S1206, the correction value adjusting unit 109compares the reliability Mgn and the reliability Mgn′ with each other.When the reliability Mgn′ is higher than the reliability Mgn′, the flowproceeds to the step S1207. On the other hand, if the reliability Mgn′is lower than the reliability Mgn, the flow proceeds to the step S1208.The reliability Mgn′ determination will be described in detail later.

In the step S1207, the correction value adjusting unit 109 updates theoffset correction value S1 stored in the data storage 107 to the offsetcorrection value S1′, proceeds to the step S1209, and ends this flow. Inthe step S1208, the correction value adjusting unit 109 updates theoffset correction value S1 stored in the data storage 107 to the offsetcorrection value S1″, proceeds to step S1209, and ends this flow.

Referring now to FIGS. 13, 14A, and 14B, a description will be given ofthe correction value S1 adjustment determination. FIG. 13 is a graphshowing the determination criteria for adjusting the correction valueS1. FIGS. 14A and 14B are graphs showing a decrease in reliability Mgn.Whether or not to start the adjustment of the correction value S1 isdetermined by whether or not the reliability Mgn is within a thresholdrange (within a predetermined range). In this embodiment, the threshold(determination criteria) of the reliability Mgn is set to 0.1 and 0.3.When the reliability Mgn is −0.3 or more and less than −0.1(−0.3≤Mgn<−0.1) or 0.1 or more and 0.3 or less (0.1≤Mgn<0.3), theadjustment of the correction value S1 starts. In other words, a grayrange M in FIG. 13 is an area (predetermined area) where the adjustmentof the correction value S1 starts.

A description will be given of the reason why it is determined that thecorrection value S1 adjustment is not started within the range N(Mgn<−0.3, Mgn≥0.3) in FIG. 13. For example, when the abnormality suchas dust is present on the scale unit 202, the reliability Mgn maypartially change for the overall length of the scale as illustrated inFIG. 14A. At the position P where there is no influence of dust, thereliability Mgn is the same as that in the normal case, but at theposition P2 where there is influence of dust, the reliability Mgndecreases and approaches to 0.5. If the correction value S1 is adjustedat the position P2 affected by dust, the cause of the decrease in thereliability Mgn is not due to the difference between the offset s1 andthe offset correction value S1, and thus an erroneous adjustment occurs.

The erroneous adjustment at the position P2 affected by dust, asillustrated in FIG. 14B, increases the reliability Mgn of the positionP2 affected by dust, while decreasing the reliability Mgn of theposition P1 not affected by dust. Thus, when it is clearly determinedthat the reliability Mgn is lowered due to the influence of dust, theerroneous adjustment can be prevented by not starting the adjustment ofthe correction value S1.

Next follows a description of a reason why it is determined that theadjustment of the correction value S1 is not started within a range O(−0.1≤Mgn<0.1) in FIG. 13. When the correction value S1 is adjusted withthe reliability Mgn of exactly or nearly 0, the reliability Mgn maybecome lower. When the offset correction value S1 is sufficiently closeto the offset s1, the offset correction value S1′S1″ causes a largerdifference from the offset s than that with the offset correction valueS1 and thus an excessive adjustment. Hence, when it is determined thatthe reliability Mgn is sufficiently high, it is possible to prevent theexcessive adjustment by not starting the correction value S1 adjustment.The above correction value S adjustment determination can prevent theerroneous adjustment and excessive adjustment of the correction valueS1.

Referring now to FIG. 15, a description will be given of the adjustmentvalue a calculation. FIG. 15 is a graph showing a relationship betweenthe reliability Mgn and the adjustment value a. In FIG. 15, the abscissaaxis represents the adjustment value a, and the ordinate axis representsthe reliability Mgn. The adjustment value a is a change amount when theoffset correction value S1 is changed to be the offset correction valueS1′ or the offset correction value S1″. The adjustment value a iscalculated based on the reliability Mgn.

When it is determined that the reliability Mgn is high (for example,when it is determined that the reliability Mgn is higher than thepredetermined reliability), the adjustment value a is decreased. On theother hand, when it is determined that the reliability Mgn is low (forexample, when it is determined that the reliability Mgn is lower thanthe predetermined reliability), the adjustment value a is increased. Inthis embodiment, as illustrated in FIG. 15, the adjustment value a islinearly changed relative to the reliability Mgn. For example, when thereliability Mgn is 0.1, the adjustment value a is set to 0.1, and whenthe reliability Mgn is −0.3, the adjustment value a is set to 0.5. Bycalculating the adjustment value a as described above, the reliabilityMgn can be efficiently increased.

Next follows a description of the acquisition of the reliability Mgn′.First, the correction value adjusting unit 109 calculates the offsetcorrection value S1′. This embodiment assumes that the relationship ofthe following expression (20) is established using the adjustment valuea between the offset correction value S1 and the offset correction valueS1′.

S1′=S+a  (20)

Next, the correcting unit 106 corrects the signal level V1 rA of thefirst a-phase displacement signal S1 rA at the execution timing T1stored in the data storage 107, using the offset correction value S1′calculated by the correction value adjusting unit 109. In addition, thecorrection unit 106 corrects the signal level of another displacementsignal stored in the data storage 107 using the offset correction valuesS2, T1, and T2. A1, A2, B1, and B2 are used for the amplitudecorrection, respectively. Next, the ABS calculating unit 102 calculatesthe absolute position Pabs′, and the reliability calculating unit 108calculates the reliability Mgn′. Thereby, the reliability Mgn′ with theoffset correction value S1′ can be acquired.

Next follows a description of the reliability Mgn′ determination. Asdescribed above, the greater the difference is between the offset s1 andthe offset correction value S1, the lower the reliability Mgn becomes,and the smaller the difference becomes, the higher the reliability Mgnbecomes. Hence, when the reliability Mgn′ is higher than the reliabilityMgn, the difference between the offset correction value S1′ and theoffset s1 is smaller than that between the offset correction value S1and the offset s 1. In other words, the offset correction value S1′ ismore suitable for the correction value than the offset correction valueS1. On the other hand, when the reliability Mgn′ is lower than thereliability Mgn, the offset correction value S1′ has a larger differencefrom the offset s1 than the offset correction value S1. Hence, theoffset correction value S1′ is less suitable for the correction valuethan the offset correction value S1. At this time, the offset correctionvalue S1″ more proper than the offset correction value S1 can be derivedby the following expression (21).

S1″=S1−a  (21)

The above reliability Mgn′ determination can determine an offsetcorrection value that is more suitable than the offset correction valueS. As described above, this embodiment can provide a position detectingapparatus that detects the position of the movable element relative tothe fixed element, while maintaining the reliability of the absoluteposition signal even during normal use.

Second Embodiment

Referring now to FIG. 16, a description will be given of a secondembodiment according to the present invention. This embodiment omits adescription of the same configuration and method as those of the firstembodiment.

FIG. 16 is a flowchart of the offset correction value S1 adjustmentaccording to this embodiment. Each step in FIG. 16 is executed by thecorrection value adjusting unit 109. First, in the step S1601, thisprocess starts. Next, in the step S1602, the correction value adjustingunit 109 acquires the offset correction value S1 and the reliability Mgnstored in the data storage 107. Next, in the step S1603, the correctionvalue adjusting unit 109 determines whether or not to start correctionvalue adjustment based on the reliability Mgn acquired in the stepS1602. If it is determined that correction value adjustment is started,the flow proceeds to the step S1604. On the other hand, if it isdetermined that the correction value adjustment is not started, the flowproceeds to the step S1607 and ends. The details of the correction valueS adjustment determination are the same as those of the firstembodiment.

In the step S1604, the correction value adjusting unit 109 calculates anadjustment value a. The details of the adjustment value a calculationare the same as those of the first embodiment. Next, in the step S1605,the correction value adjusting unit 109 acquires a plurality ofreliabilities Mgn′, Mgn″, . . . , Mgn{circumflex over ( )}n with aplurality of (three or more) offset correction values S1′, S1″, . . . ,S1{circumflex over ( )}n that is made by multiplying the offsetcorrection value S1 by a constant multiple of the adjustment value a,where n is a natural number of 3 or more. A plurality of reliabilitiesMgn′, Mgn″, . . . , Mgn{circumflex over ( )}n are acquired in a mannersimilar to that of an acquisition of the reliability Mgn′ of the firstembodiment.

Next, in the step S1606, the correction value adjusting unit 109 updatesthe offset correction value S1 stored in the data storage 107 to theoffset correction value S1{circumflex over ( )}n having the highestreliability among the plurality of reliabilities Mgn′, Mgn″, . . . ,Mgn{circumflex over ( )}n. Then, the flow proceeds to the step S1607 andends. As described above, this embodiment can compare and adjust aplurality of correction values.

Third Embodiment

Referring now to FIGS. 17 and 18, a description will be given of a thirdembodiment according to the present invention. This embodiment omits adescription of the same configuration and method as those of the firstembodiment.

FIG. 17 is a flowchart of the offset correction value S1 adjustmentaccording to this embodiment. Each step in FIG. 17 is executed by thecorrection value adjusting unit 109. First, in the step S1701, thisprocess starts. Next, in the step S1702, the correction value adjustingunit 109 acquires the offset correction value S1 and the reliability Mgnstored in the data storage 107. Next, in the step S1703, the correctionvalue adjusting unit 109 determines whether to start correction valueadjustment based on the reliability Mgn acquired in the step S1702. Ifit is determined to start correction value adjustment, the flow proceedsto step S1704. On the other hand, if it is determined not to start thecorrection value adjustment, the flow proceeds to the step S1707 andends. The details of the correction value S1 adjustment determinationare the same as those of the first embodiment.

In the step S1704, the correction value adjusting unit 109 calculates anadjustment value a. The details of the adjustment value a calculationare the same as those of the first embodiment. Next, in the step S1705,the correction value adjusting unit 109 acquires the reliability Mgn′with the offset correction value S1′ obtained by changing the offsetcorrection value S1 by the adjustment value a. The details of obtainingthe reliability Mgn′ are the same as those of the first embodiment.

Next, in the step S1706, the correction value adjusting unit 109 updatesthe offset correction value S1 stored in the data storage 107 to theoffset correction value S1″ having the reliability Mgn″ as a targetvalue. Then, the flow proceeds to the step S1707 and ends. In thisembodiment, the target value of the reliability Mgn″ is set to 0.05.

FIG. 18 is a graph showing the prediction of the offset correctionvalue, and illustrates the relationship between the offset correctionvalue and the reliability Mgn. As illustrated in FIG. 18, based on thereliability Mgn with the offset correction value S1 and the reliabilityMgn′ with the offset correction value S1′, the offset correction valueS1″ having the reliability Mgn″ is predicted. Thereby, the offsetcorrection value S1″ can be calculated. As described above, thisembodiment can predict and adjust the correction value.

Each of the above embodiments adjusts the offset correction values S1,S2, T1, and T2. However, the present invention is not limited to thisembodiment, and the amplitude correction values A1, A2, B1, and B2 canbe adjusted by a similar method. Each embodiment performs the correctionvalue adjusting processing after the absolute position reliabilitydetermination. However, the present invention is not limited to thisembodiment, and the correction value adjusting processing may beperformed before the absolute position reliability determination as longas it is after the reliability calculation. Even in this case, thecorrection value adjusting processing can be performed. In eachembodiment, in changing the adjustment value a, the adjustment value ais linearly changed with the reliability Mgn. However, the presentinvention is not limited to this embodiment. The linearity isunnecessary as long as the adjustment value a is decreased if it isdetermined that the reliability Mgn is high and the adjustment value ais increased if the reliability Mgn is low. Even in this case, thecorrection value adjusting processing can be performed efficiently.

Fourth Embodiment

Referring now to FIGS. 19 to 25, a description will be given of a fourthembodiment according to the present invention. This embodiment omits adescription of the same configuration and method as those of the firstembodiment.

FIG. 19 is a sectional view of the ABS sensor 104 according to thisembodiment. In FIG. 19, a movable element 191 is movable memberconfigured to move in a direction perpendicular to the paper surface(X-axis direction). A fixed element 192 is an element configured toserve as a reference for the absolute position of the movable element191. A light source 1901 is a light emitting unit, such as an LED. Ascale portion 1902 has three track patterns 1903 a, 1903 b, and 1903 cthat are equally spaced and have different numbers of slits for theoverall length. The light receiving units 1904 a, 1904 b, and 1904 creceive light from the light source 1901 reflected by the track patterns1903 a, 1903 b, and 1903 c, respectively, and include, for example,photodiode arrays.

A signal processing circuit 1905 processes signals received by the lightreceiving units 1904 a, 1904 b, and 1904 c, and outputs a signal of anyone of the track patterns 1903 a, 1903 b, and 1903 c in accordance withthe switching signal of the scale switching unit 103. In thisembodiment, the movable element 191 has the scale portion 1902 and thefixed element 192 has the light source 1901 and the light receivingunits 1904 a, 1904 b, and 1904 c, but the present invention is notlimited to this embodiment. For example, the scale element 1902 may beprovided on the fixed element 192, and the light source 1901 and thelight receiving units 1904 a, 1904 b, and 1904 c may be provided on themovable element 191.

FIG. 20 is a plan view of the scale portion 1902 according to thisembodiment. Although FIG. 20 illustrates a reflection type slit patternas an example, another configuration such as a transmission type slitpattern may be employed. The scale portion 1902 includes three trackpatterns, i.e., a track pattern (first track pattern) 1903 a, a trackpattern (second track pattern) 1903 b, and a track pattern (third trackpattern) 1903 c. The reflectors in the track patterns 1903 a, 1903 b,and 1903 c are arranged at regular intervals P1, P2, and P3,respectively. When light emitted from the light source 1901 enters thereflectors in the track patterns 1903 a and 1903 b, the light isreflected toward the light receiving units 1904 a, 1904 b, and 1904 c,respectively. In this embodiment, the interval P1 is configured with 161reflectors for the overall length of the scale or 161 periods for theoverall length Lmax. The interval P2 is configured with 80 reflectorsfor the overall length of the scale or 80 periods for the overall lengthLmax. The interval P3 is configured with 37 reflectors for the overalllength of the scale or 37 periods for the overall length Lmax.

Similar to the first embodiment, the signal processing circuit 1905generates the first a-phase displacement signal S1 rA as the a-phasedisplacement signal and the first b-phase displacement signal S1 rB asthe b-phase displacement signal of the track pattern 1903 a, based onthe signal from the light receiving unit 1904 a. The signal processingcircuit 1905 generates the second a-phase displacement signal S2 rA asthe a-phase displacement signal and the second b-phase displacementsignal S2 rB as the b-phase displacement signal of the track pattern1903 b based on the signal from the light receiving unit 1904 b,respectively. The signal processing circuit 1905 generates the thirda-phase displacement signal S3 rA as the a-phase displacement signal andthe third b-phase displacement signal S3 rB as the b-phase displacementsignal of the track pattern 1903 c based on the signal from the lightreceiving unit 1904 c, respectively. Herein, the signal processingcircuit 1905 (ABS sensor 104) outputs a displacement signal selected inaccordance with the switching signal from the scale switching unit 103.In other words, the ABS sensor 104 outputs the first a-phasedisplacement signal S1 rA and the first b-phase displacement signal S1rB, the second a-phase displacement signal S2 rA and the second b-phasedisplacement signal S2 rB, or the third a-phase displacement signal S3rA and the third b-phase displacement signal S3 rB.

Next follows a description of an operation of the position detectingapparatus 100 according to this embodiment. FIG. 21 is a flowchartshowing the operation of the position detecting apparatus 100. Each stepin FIG. 21 is executed by each unit of the position detecting apparatus100.

First, in the step S2101, this flow starts. This flow (absolute positionPabs determining processing) starts when the ABS determining unit 101requests the ABS calculating unit 102 to calculate the absolute positionPabs. Next, in the step S2102, the ABS calculating unit 102 outputs afirst switching signal for switching to the first scale (track pattern1903 a) to the scale switching unit 103. In response to the firstswitching signal, the scale switching unit 103 instructs the ABS sensor104 to output a signal of the track pattern 1903 a. Then, the ABS sensor104 outputs a first a-phase displacement signal S1 rA and a firstb-phase displacement signal S1 rB. The first a-phase displacement signalS1 rA and the first b-phase displacement signal S1 rB are converted intodigital signals by the A/D converter 105 and output to the ABScalculating unit 102.

Next, in the step S2103, the correction unit 106 acquires the signallevel V1 rA of the first a-phase displacement signal S1 rA and thesignal level V1 rB of the first b-phase displacement signal S1 rB at theexecution timing T1 of the step S2103 output from the A/D converter 105.At the same time, the data storage 107 stores the signal level V1 rA ofthe first a-phase displacement signal S1 rA and the signal level V1 rBof the first b-phase displacement signal S1 rB.

Next, in the step S2104, the correction unit 106 corrects the signallevel V1 rA of the first a-phase displacement signal S1 rA and thesignal level V1 rB of the first b-phase displacement signal S1 rB at theexecution timing T1. Herein, the correction is made in the same manneras that in the first embodiment. a1 and a2 are an amplitude correctionvalue A1 of the first a-phase displacement signal S1 rA and an amplitudecorrection value A2 of the first b-phase displacement signal S1 rB,respectively, and stored in the data storage 107. Further, s1 and s2 arean offset correction value S1 of the first a-phase displacement signalS1 rA and an offset correction value S2 of the first b-phasedisplacement signal S1 rB, respectively, and stored in the data storage107.

Next, in the step S2105, the ABS calculating unit 102 outputs a secondswitching signal for switching to the second scale (track pattern 1903b) to the scale switching unit 103. In response to the second switchingsignal, the scale switching unit 103 instructs the ABS sensor 104 tooutput a signal of the track pattern 1903 b. The ABS sensor 104 outputsa second a-phase displacement signal S2 rA and a second b-phasedisplacement signal S2 rB. The second a-phase displacement signal S2 rAand the second b-phase displacement signal S2 rB are converted intodigital signals by the A/D converter 105 and output to the correctionunit 106.

Next, in the step S2106, the correction unit 106 acquires the signallevel V2 rA of the second a-phase displacement signal S2 rA and thesignal level V2 rB of the second b-phase displacement signal S2 rB atthe execution timing T2 of step S2106 output from the A/D converter 105.At the same time, the data storage 107 stores the signal level V2 rA ofthe second a-phase displacement signal S2 rA and the signal level V2 rBof the second b-phase displacement signal S2 rB.

Next, in the step S2107, the correction unit 106 corrects the signallevel V2 rA of the second a-phase displacement signal S2 rA and thesignal level V2 rB of the second b-phase displacement signal S2 rB atthe execution timing T2. Herein, the correction is made in the samemanner as that of the first embodiment. b1 and b2 are an amplitudecorrection value B1 of the second a-phase displacement signal S2 rA andan amplitude correction value B2 of the second b-phase displacementsignal S2 rB, respectively, and stored in the data storage 107. t1 andt2 are an offset correction value T1 of the second a-phase displacementsignal S2 rA and an offset correction value T2 of the second b-phasedisplacement signal S2 rB, respectively, and stored in the data storage107.

Next, in the step S2108, the ABS calculating unit 102 outputs a thirdswitching signal for switching to the third scale (track pattern 1903 c)to the scale switching unit 103. In response to the third switchingsignal, the scale switching unit 103 instructs the ABS sensor 104 tooutput a signal of the track pattern 1903 b. The ABS sensor 104 outputsa third a-phase displacement signal S3 rA and a third b-phasedisplacement signal S3 rB. The third a-phase displacement signal S3 rAand the third b-phase displacement signal S3 rB are converted intodigital signals by the A/D converter 105 and output to the correctionunit 106.

Next, in the step S2109, the correction unit 106 acquires the signallevel V3 rA of the third a-phase displacement signal S3 rA and thesignal level V3 rB of the third b-phase displacement signal S3 rB at theexecution timing T3 of the step S2109 output from the A/D converter 105.At the same time, the data storage 107 stores the signal level V3 rA ofthe third a-phase displacement signal S3 rA and the signal level V3 rBof the third b-phase displacement signal S3 rB.

Next, in the step S2110, the correction unit 106 corrects the signallevel V3 rA of the third a-phase displacement signal S3 rA and thesignal level V3 rB of the third b-phase displacement signal S3 rB at theexecution timing T3. Herein, the correction is made in the same manneras that of the first embodiment. c1 and c2 are an amplitude correctionvalue C1 of the third a-phase displacement signal S3 rA and an amplitudecorrection value C2 of the third b-phase displacement signal S3 rB,respectively, and stored in the data storage 107. u1 and u2 are anoffset correction value U1 of the third a-phase displacement signal S3rA and an offset correction value U2 of the third b-phase displacementsignal S3 rB, respectively, and stored in the data storage 107.

Next, in the step S2111, the ABS calculating unit 102 calculates theabsolute position Pabs. The absolute position calculating processingwill be described in detail later. Next, in the step S2112, thereliability calculating unit 108 calculates a plurality of reliabilitiesMgn1, Mgn2, Mgn3, and Mgn4 that are parameters indicating thereliability of the absolute position Pabs calculated in the step S2111.The plurality of reliabilities will be described in detail later. Thedata storage 107 stores a plurality of reliabilities Mgn1, Mgn2, Mgn3,and Mgn4.

Next, in the step S2113, the reliability calculating unit 108 determinesthe reliability of the absolute position Pabs calculated in the stepS2111 based on the plurality of reliability Mgn1, Mgn2, Mgn3, and Mgn4calculated in the step S2112. If it is determined that the reliabilityis high, the flow proceeds to the step S2115. On the other hand, if itis determined that the reliability is low, the flow proceeds to the stepS2114.

In the step S2114, an abnormality notifying unit (not shown) such as anLED notifies the user of the abnormality, and proceeds to the stepS2115. In the step S2115, the correction value adjusting unit 109performs correction value adjusting processing, and proceeds to the stepS2116. The correction value adjusting processing will be described indetail later. In the step S2116, this flow ends. According to this flow,the ABS determining unit 101 determines the absolute position Pabscalculated by the ABS calculating unit 102 as the absolute position ofthe movable element 191 (the position of the object).

Referring now to FIGS. 22 and 23A to 23F, a description will be given ofthe absolute position calculating processing (step S2111). FIG. 22 is aflowchart illustrating absolute position calculating processing(calculation processing of the absolute position Pabs). Each step inFIG. 22 is executed by the ABS calculating unit 102. FIGS. 23A to 23Fare graphs of each signal. FIGS. 23A to 23C show the first relativeposition signal Inc1, the second relative position signal Inc2, and thethird relative position signal Inc3, respectively. FIGS. 23D to 23Fillustrate Vernier signals Pv1, Pv2, and Pv3, respectively. In each ofFIGS. 7A to 7F, the abscissa axis indicates the position in the overalllength of the scale, and the ordinate axis indicates the signal level.

First, in the step S2201, this flow starts. Next, in the step S2202, theABS calculating unit 102 calculates the first relative position signalInc1 having an amplitude Vmax and 161 periods for the overall length ofthe scale as illustrated in FIG. 23A, using the corrected first a-phasedisplacement signal S1 cA and first b-phase displacement signal S1 cB.Similar to the first embodiment, this embodiment calculates the signallevel V1inc1 of the first relative position signal Inc1 at the executiontiming T1.

Next, in the step S2203, the ABS calculating unit 102 calculates thesecond relative position signal Inc2 having an amplitude Vmax and 80periods for the overall length of the scale as illustrated in FIG. 23B,using the corrected second a-phase displacement signal S2 cA and secondb-phase displacement signal S2 cB. Herein, similar to the step S2202,the signal level V2inc2 of the second relative position signal Inc2 atthe execution timing T2 is calculated.

Next, in the step S2204, the ABS calculating unit 102 calculates thethird relative position signal Inc3 having an amplitude Vmax and 37periods for the overall length of the scale as illustrated in FIG. 23C,using the corrected third a-phase displacement signal S3 cA and thirdb-phase displacement signal S3 cB. Herein, similar to the step S2202,the signal level V3inc3 of the third relative position signal Inc3 atthe execution timing T3 is calculated.

Next, in the step S2205, the ABS calculating unit 102 calculates theVernier signal Pv1 based on the signal level V1inc1 of the firstrelative position signal Inc at the execution timing T1 and the signallevel V2inc2 of the second relative position signal Inc2 at theexecution timing T2. The Vernier signal Pv1 calculated at this time isillustrated in FIG. 23D. The second relative position signal Inc2 is asignal of 80 periods for the overall length of the scale. Herein, bydoubling the amplitude Vmax and subtracting Vmax when the amplitude isequal to or larger than the amplitude Vmax, the second relative positionsignal Inc2′ can be generated, which is a signal of 160 periods for theoverall length of the scale.

The Vernier signal Pv1 can be obtained by calculating a differencebetween the signal level V1inc1 of the first relative position signalInc1 and the signal level V2inc2′ of the second relative position signalInc2′, and by adding the amplitude Vmax when the difference has anegative value. Since a periodic difference is one for the overalllength Lmax between the first relative position signal Inc and thesecond relative position signal Inc2′, the Vernier signal Pv1 has atriangular wave of one period for the overall length Lmax as illustratedin FIG. 23D. If the Vernier signal Pv1 is calculated in the step S2205,the flow proceeds to the step S2206.

In the step S2206, the ABS calculating unit 102 calculates the Verniersignal Pv2 based on the signal level V2inc2 of the second relativeposition signal Inc2 at the execution timing T2 and the signal levelV3inc3 of the third relative position signal Inc3 at the executiontiming T3. The Vernier signal Pv2 calculated at this time is illustratedin FIG. 23E. The third relative position signal Inc3 is a signal of 37periods for the overall length of the scale. Herein, by doubling theamplitude Vmax and by subtracting Vmax when the amplitude is equal to orlarger than the amplitude Vmax, the third relative position signal Inc3′can be generated, which is a signal of 74 periods for the overall lengthof the scale.

The Vernier signal Pv2 is obtained by calculating a difference betweenthe signal level V2inc2 of the second relative position signal Inc2 andthe signal level V3inc3′ of the third relative position signal Inc3′,and by adding the amplitude Vmax when the difference has a negativevalue. Since the periodic difference is six for the overall length Lmaxbetween the second relative position signal Inc2 and the third relativeposition signal Inc3′, the Vernier signal Pv2 has a sawtooth wave of 6periods for the overall length Lmax as illustrated in FIG. 23E. When theVernier signal Pv2 is calculated in the step S2206, the flow proceeds tothe step S2207.

In the step S2207, the ABS calculating unit 102 calculates the Verniersignal Pv3 based on the signal level V1inc1 of the first relativeposition signal Inc1 at the execution timing T1 and the signal levelV3inc3 of the third relative position signal Inc3 at the executiontiming T3. The Vernier signal Pv3 calculated at this time is illustratedin FIG. 23F. The third relative position signal Inc3 is a signal of 37periods for the overall length of the scale. Here, by quadrupling theamplitude Vmax and by subtracting Vmax when the amplitude is equal to orlarger than the amplitude Vmax, a third relative position signal Inc3″can be generated which is a signal of 148 periods for the overall lengthof the scale.

The Vernier signal Pv3 is obtained by calculating a difference betweenthe signal level V1inc1 of the first relative position signal Inc1 andthe signal level V3inc3″ of the third relative position signal Inc3″,and by adding the amplitude Vmax when the difference has a negativevalue. Here, since the periodic difference is thirteen for the overalllength Lmax between the first relative position signal Inc1 and thethird relative position signal Inc3″, the Vernier signal Pv3 has asawtooth wave of 13 periods for the overall length Lmax as illustratedin FIG. 23F. When the Vernier signal Pv3 is calculated in the stepS2207, the flow proceeds to step S2208.

In the step S2208, the ABS calculating unit 102 calculates the absoluteposition Pabs. A detailed description will be given of a method ofcalculating the absolute position Pabs. Each of the first a-phasedisplacement signal S1 rA, the first b-phase displacement signal S1 rB,the second a-phase displacement signal S2 rA, the second b-phasedisplacement signal S2 rB, the third a-phase displacement signal S3 rA,and the third b-phase displacement signal S3 rB includes an errorcomponent. Hence, the first relative position signal Inc1, the secondrelative position signal Inc2, and the third relative position signalInc3 calculated from these signals also contain error components. Inorder to correct (reduce) these error components, the ABS calculatingunit 102 performs a synchronous calculation of the plurality of signals.Herein, the plurality of signals are the Vernier signal Pv1 that is thehighest signal, the Vernier signal Pv2 that is a higher signal, theVernier signal Pv3 that is a middle signal, the third relative positionsignal Inc3 that is a lower signal, and the first relative positionsignal Inc1 that is the lowest signal. The synchronization calculationof the plurality of signals is performed by synchronizing the highersignal and the lower signal with each other in order from the highersignal. The synchronization calculation method is similar to that of thefirst embodiment.

First, the ABS calculating unit 102 synchronizes the highest signal andthe higher signal with each other. Next, the ABS calculating unit 102synchronizes the higher signal and the middle signal with each other,the middle signal and the lower signal with each other, the lower signaland the lowest signal with each other, and calculates a combinationsignal as a signal Vabs indicating the absolute position. Aftercalculating the absolute position Pabs at the execution timing T1 usingthe Vernier signals Pv1, Pv2, and Pv3, the third relative positionsignal Inc3, and the first relative position signal Inc1 in the stepS2208, the flow proceeds to the step S2209 and ends. As described above,the absolute position Pabs can be calculated.

Next follows a description of a plurality of reliabilities Mgn1, Mgn2,Mgn3, and Mgn4. The reliability is calculated in a manner similar tothat of the first embodiment. This embodiment performs foursynchronizations between the highest signal and the higher signal,between the higher signal and the middle signal, between the middlesignal and the lower signal, and between the lower signal and the lowestsignal. Hence, the reliabilities Mgn1, Mgn2, Mgn3, and Mgn4 arecalculated in each synchronization.

Referring now to FIG. 24, a description will be given of correctionvalue adjusting processing according to this embodiment. The correctionvalue adjusting unit 109 adjusts the offset correction values S1 and S2of the first a-phase displacement signal S1 rA and the first b-phasedisplacement signal S1 rB stored in the data storage 107. The correctionvalue adjusting unit 109 adjusts the offset correction values T1 and T2of the second a-phase displacement signal S2 rA and the second b-phasedisplacement signal S2 rB stored in the data storage 107. The correctionvalue adjusting unit 109 adjusts the offset correction values U1 and U2of the third a-phase displacement signal S3 rA and the third b-phasedisplacement signal S3 rB stored in the data storage 107.

FIG. 24 is a flowchart of the correction value adjusting processing(step S2115). Each step in FIG. 24 is executed by the correction valueadjusting unit 109.

First, in the step S2401, the correction value adjusting processingstarts. Next, in the step S2402, the correction value adjusting unit 109acquires the reliabilities Mgn1, Mgn2, Mgn3, and Mgn4 stored in the datastorage 107. Next, in the step S2403, the correction value adjustingunit 109 determines whether or not the reliability Mgn1 falls within a(first) threshold range. When the reliability Mgn1 is within thethreshold range, the flow proceeds to the step S2404, and if not, theflow proceeds to the step S2406. In this embodiment, the threshold ofthe reliability Mgn1 is set to 0.1 (−0.1) and 0.3 (−0.3). Then, when thereliability Mgn1 is −0.3 or more and less than −0.1 or 0.1 or more andless than 0.3 (when the reliability Mgn1 falls within the thresholdrange), the correction value adjusting unit 109 determines that it isnecessary to adjust the correction values T1 and T2, and startsadjusting the correction values.

A description will now be given of a reason why it can determine thatthe correction values T1 and T2 need to be adjusted based on thereliability Mgn1. The reliability Mgn1 is calculated in synchronizingthe Vernier signal Pv1 that is the highest signal with the Verniersignal Pv2 that is the higher signal. The Vernier signal Pv1 is a signalgenerated from the first relative position signal Inc1 and the secondrelative position signal Inc2. The Vernier signal Pv2 that is the highersignal is a signal generated from the second relative position signalInc2 and the second relative position signal Inc3. In other words, boththe highest signal and the higher signal are calculated based on thesecond relative position signal Inc2.

The second relative position signal Inc2 is calculated from the seconda-phase displacement signal S2 rA and the second b-phase displacementsignal S2 rB. If the offset correction values T1 and T2 shift from theoffsets t1 and t2, respectively, the second relative position signalInc2 comes to contain an error. This error becomes an error insynchronizing the highest signal with the higher signal from the aboverelationship, and the reliability Mgn1 lowers. For the same reason, anerror occurs when the higher signal and the middle signal aresynchronized with each other, and the reliability Mgn2 lowers. However,since the Vernier signal Pv3 is not a signal calculated based on thesecond relative position signal Inc2, the influence on the reliabilityMgn2 is smaller than the reliability Mgn1. As discussed, it can bedetermined that the correction values T1 and T2 need to be adjustedbased on the reliability Mgn1.

In the step S2404, the correction value adjusting unit 109 adjusts theoffset correction value T1 of the second a-phase displacement signal S2rA. The adjustment of the offset correction value T1 will be describedin detail later. Next, in the step S2405, the correction value adjustingunit 109 adjusts the offset correction value T2 of the second b-phasedisplacement signal S2 rB. Next, in the step S2406, the correction valueadjusting unit 109 determines whether or not the reliability Mgn3 fallswithin a (second) threshold range. If the reliability Mgn3 is within thethreshold range, the flow proceeds to the step S2407. On the other hand,if the reliability Mgn3 is located out of the threshold range, the flowproceeds to the step S2409. In this embodiment, when the reliabilityMgn3 is −0.3 or more and −0.1 or less, or 0.1 or more and 0.3 or less(or when the reliability Mgn3 falls within the threshold range), thecorrection value adjusting unit 109 determines that it is necessary toadjust the correction values S1, S2, U1, and U2, and starts adjustingeach correction value.

The reliability Mgn3 is calculated when the Vernier signal Pv3 that isthe middle signal, and the third relative position signal Inc3 that isthe lower signal are synchronized with each other. The Vernier signalPv3 is a signal generated from the first relative position signal Inc1and the third relative position signal Inc3. In other words, both themiddle signal and the lower signal are calculated based on the thirdrelative position signal Inc3. Hence, it is possible to determine thatthe correction values U1 and U2 need to be adjusted based on thereliability Mgn3, similar to the reason why it can be determined basedon the reliability Mgn1 that the correction values T1 and T2 need to beadjusted.

When the Vernier signal Pv3 is generated, the first relative positionsignal Inc1 is used at the same magnification, and the third relativeposition signal Inc3 is used in quadruple. Hence, the Vernier signal Pv3is particularly susceptible to the error of the first relative positionsignal Inc1. In other words, the reliabilities Mgn2 and Mgn3 calculatedin synchronizing the Vernier signal Pv3 are particularly susceptible tothe error of the first relative position signal Inc1. The reliabilityMgn3 is particularly affected by the third relative position signal Inc3for the above reason. The reliability Mgn3 is particularly likely to belower than the reliability Mgn2. It can be determined based on thereliability Mgn3 that the correction values S1 and S2 need to beadjusted.

In the step S2407, the correction value adjusting unit 109 adjusts theoffset correction value S1 of the first a-phase displacement signal S1rA. Next, in the step S2408, the correction value adjusting unit 109adjusts the offset correction value S2 of the first b-phase displacementsignal S1 rB. Next, in the step S2409, the correction value adjustingunit 109 adjusts the offset correction value U1 of the third a-phasedisplacement signal S3 rA. Next, in the step S2410, the correction valueadjusting unit 109 adjusts the offset correction value U2 of the thirdb-phase displacement signal S3 rB. Then, the flow proceeds to the stepS2411 and ends.

Referring now to FIG. 25, a description will be given of the offsetcorrection value T1 adjustment (step S2404) according to thisembodiment. In addition, since the same processing is performed for theadjustment of offset correction value S1, S2, T2, U1, and U2, adescription thereof will be omitted.

FIG. 25 is a flowchart of the offset correction value T1 adjustment.Each step in FIG. 25 is executed by the correction value adjusting unit109. First, in the step S2501, this processing starts. Next, in the stepS2502, the correction value adjusting unit 109 acquires the offsetcorrection value T1 stored in the data storage 107.

Next, in the step S2503, the correction value adjusting unit 109calculates an adjustment value a. The method for calculating theadjustment value a is the same as that of the first embodiment. Next, inthe step S2504, the correction value adjusting unit 109 acquires thereliability Mgn1′ at the offset correction value T1′ obtained bychanging the offset correction value T1 by the adjustment value a. Whenthe offset correction value T1 is changed, the reliabilities Mgn1 andMgn2 change. Thus, the reliability Mgn1 is likely to be lower than thereliability Mgn2. The reliability Mgn1 is the most suitable among allreliabilities for adjusting the offset correction value T1, and may beused.

Next, in the step S2505, the correction value adjusting unit 109compares the reliability Mgn1 and the reliability Mgn1′ with each other.When the reliability Mgn1′ is higher than the reliability Mgn1, the flowproceeds to step S2506. On the other hand, when the reliability Mgn1′ islower than the reliability Mgn, the flow proceeds to the step S2507.

In the step S2506, the correction value adjusting unit 109 updates theoffset correction value T1 stored in the data storage 107 to the offsetcorrection value T1′, proceeds to the step S2508, and ends this flow. Inthe step S2507, the correction value adjusting unit 109 updates theoffset correction value T1 stored in the data storage 107 to the offsetcorrection value T1″, proceeds to the step S2508, and ends this flow.This embodiment can adjust the correction value more efficiently andwith high accuracy by using the plurality of reliabilities.

Each of the above embodiments has discussed the influence of dust as anexample of the factor that decreases the reliability Mgn. However, thepresent invention is not limited to this embodiment and is applicable toall adversary effects that lead to abnormal absolute positioncalculations, such as scale scratches, external forces, other distortionof the scale and sensor, and characteristic changes due to thetemperature.

Fifth Embodiment

Referring now to FIG. 26, a description will be given of an imagingapparatus including the position detecting apparatus 100 according toeach of the above embodiments. FIG. 26 is a configuration diagram of animaging apparatus 200 (single-lens reflex camera). In FIG. 26, aninterchangeable lens (lens apparatus) 30 includes an imaging opticalsystem 1 including a lens (optical element) 11. The interchangeable lens30 has a position detecting apparatus 100 that detects the position ofthe lens 11 (the position of the object).

A camera body (imaging apparatus body) 20 includes a quick return mirror3, a focus screen 4, a penta dach prism 5, an eyepiece lens 6, and thelike. The quick return mirror 3 upwardly reflects a light beam formedvia the imaging optical system 1. The focus screen 4 is disposed at animaging position of the imaging optical system 1. The penta dach prism 5converts a reverse image formed on the focus screen 4 into an erectimage. The user can observe the erect image through the eyepiece lens 6.An image sensor 7 includes a CCD sensor and a CMOS sensor, andphotoelectrically converts an optical image (subject image) formed viathe imaging optical system 1 and outputs image data. In capturing animage, the quick return mirror 3 is retracted from the optical path, andthe optical image is formed on the image sensor 7 via the imagingoptical system 1. The camera control unit 10 has a CPU and controls theoperation of each component in the imaging apparatus 200.

The imaging apparatus 200 includes the camera body 20 having the imagesensor 7 and the interchangeable lens 30 that is detachably attached tothe camera body 20, but is not limited to this embodiment. In an imagingapparatus the camera body and the lens apparatus may be integrated witheach other, or a single-lens non-reflex camera (mirrorless camera)having no quick return mirror may be used.

Thus, in each embodiment, the position detecting apparatus 100 includesthe signal detecting unit (ABS sensor 104), the correction unit 106, theABS calculating unit 102, the reliability calculating unit 108, and thecorrection value adjusting unit 109. The signal detecting unit detects aplurality of periodic signals (S1 rA, S1 rB, S2 rA, S2 rB, S3 rA, S3 rB)relating to the position of the object. The correction unit corrects aplurality of periodic signals using the correction values (amplitudecorrection values A1, A2, B1, B2, C1, C2 and offset correction valuesS1, S2, T1, T2, U1, U2), and generates a plurality of correction signals(S1 cA, S1 cB, S2 cA, S2 cB, S3 cA, S3 cB). The ABS calculating unit 102generates a plurality of displacement signals (Inc1, Inc2, Inc3, Pv1,Pv2, Pv3) based on the plurality of correction signals, and calculates aposition (absolute position of the object) based on the plurality ofdisplacement signals. The reliability calculating unit calculates thereliability (Mgn) based on the plurality of displacement signals. Thecorrection value adjusting unit adjusts the correction value based onthe reliability.

The object may be movable member (movable elements 21, 191), and theplurality of periodic signals indicate the position of the movablemember relative to the fixed member (fixed elements 22, 192). Thecorrection unit corrects offsets of a plurality of periodic signalsusing the correction value (offset correction values S1, S2, T1, T2, U1,and U2). The correction unit may correct amplitudes of a plurality ofperiodic signals using the correction value (amplitude correction valuesA1, A2, B1, B2, C1, and C2).

The reliability calculating unit may calculate the first reliability(Mgn1) corresponding to the first correction value (such as the offsetcorrection value S1) and the second reliability (Mgn′) corresponding tothe second correction value (such as the offset correction value S1′).The correction value adjusting unit may change the first correctionvalue to the second correction value when the second reliability ishigher than the first reliability. The correction value adjusting unitmay not change the first correction value to the second correction valuewhen the second reliability is lower than the first reliability. Whenthe second reliability is lower than the first reliability, thecorrection value adjusting unit may change the first correction value toa third correction value (such as the offset correction value S1″)different from the second correction value. The second correction valuemay be larger than the first correction value, and the third correctionvalue may be smaller than the first correction value. Alternatively, thesecond correction value may be smaller than the first correction value,and the third correction value may be larger than the first correctionvalue.

When the first reliability is higher than the predetermined reliability,the correction value adjusting unit may reduce each of a differencebetween the first correction value and the second correction value, anda difference (adjustment value a) between the first correction value andthe third correction value. On the other hand, when the firstreliability is lower than the predetermined reliability, the correctionvalue adjusting unit increases each of a difference between the firstcorrection value and the second correction value, and a difference(adjustment value a) between the first correction value and the thirdcorrection value.

The reliability calculating unit may calculate a first reliabilitycorresponding to the first correction value and a plurality ofreliabilities corresponding to a plurality of correction valuesdifferent from the first correction value. Then, the correction valueadjusting unit may change the first correction value to the secondcorrection value selected from among the plurality of correction values(such as a correction value having the highest reliability among theplurality of reliabilities). The second reliability corresponding to thesecond correction value may be higher than the first reliability.

The reliability calculating unit may calculate the first reliabilitycorresponding to the first correction value and the second reliabilitycorresponding to the second correction value. The correction valueadjusting unit may predict a third correction value having a thirdreliability higher than the first reliability based on the firstreliability and the second reliability, and change the first correctionvalue to the third correction value (see FIG. 18). The correction valueadjusting unit may adjust the correction value when the correction valuefalls within a predetermined range, and may not adjust the correctionvalue when the correction value is located outside the predeterminedrange (see FIG. 13).

The correction unit may correct each of the plurality of periodicsignals based on the plurality of correction values. In addition, thereliability calculating unit may calculate the plurality ofreliabilities (Mgn1 to Mgn4). The correction value adjusting unit mayadjust at least one correction value selected from the plurality ofcorrection values based on the plurality of reliabilities.

OTHER EMBODIMENTS

Embodiment(s) of the present invention can also be realized by acomputer of a system or apparatus that reads out and executes computerexecutable instructions (e.g., one or more programs) recorded on astorage medium (which may also be referred to more fully as a‘non-transitory computer-readable storage medium’) to perform thefunctions of one or more of the above-described embodiment(s) and/orthat includes one or more circuits (e.g., application specificintegrated circuit (ASIC)) for performing the functions of one or moreof the above-described embodiment(s), and by a method performed by thecomputer of the system or apparatus by, for example, reading out andexecuting the computer executable instructions from the storage mediumto perform the functions of one or more of the above-describedembodiment(s) and/or controlling the one or more circuits to perform thefunctions of one or more of the above-described embodiment(s). Thecomputer may comprise one or more processors (e.g., central processingunit (CPU), micro processing unit (MPU)) and may include a network ofseparate computers or separate processors to read out and execute thecomputer executable instructions. The computer executable instructionsmay be provided to the computer, for example, from a network or thestorage medium. The storage medium may include, for example, one or moreof a hard disk, a random-access memory (RAM), a read only memory (ROM),a storage of distributed computing systems, an optical disk (such as acompact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™),a flash memory device, a memory card, and the like.

Each embodiment can provide a position detecting apparatus, a lensapparatus, a position detecting method, and a storage medium that caninexpensively maintain the detection accuracy of the position of anobject.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2018-203152, filed on Oct. 29, 2018, which is hereby incorporated byreference herein in its entirety.

What is claimed is:
 1. A position detecting apparatus comprising: asignal detecting unit configured to detect a plurality of periodicsignals relating to a position of an object; a correction unitconfigured to correct the plurality of periodic signals using acorrection value to generate a plurality of correction signals; a firstcalculating unit configured to generate a plurality of displacementsignals based on the plurality of correction signals and to calculatethe position based on the plurality of displacement signals; a secondcalculating unit configured to calculate a reliability based on theplurality of displacement signals; and a correction value adjusting unitconfigured to adjust the correction value based on the reliability,wherein the second calculating unit calculates a first reliabilitycorresponding to a first correction value and a second reliabilitycorresponding to a second correction value, and wherein the correctionvalue adjusting unit changes the first correction value to the secondcorrection value when the second reliability is higher than the firstreliability.
 2. The position detecting apparatus according to claim 1,wherein the object is a movable member, and the plurality of periodicsignals indicate a position of the movable member relative to a fixedmember.
 3. The position detecting apparatus according to claim 1,wherein the correction unit corrects offsets of the plurality ofperiodic signals using the correction value.
 4. The position detectingapparatus according to claim 1, wherein the correction unit correctsamplitudes of the plurality of periodic signals using the correctionvalue.
 5. The position detecting apparatus according to claim 1, whereinthe correction value adjusting unit does not change the first correctionvalue to the second correction value when the second reliability islower than the first reliability.
 6. The position detecting apparatusaccording to claim 1, wherein the correction value adjusting unitchanges the first correction value to a third correction value differentfrom the second correction value when the second reliability is lowerthan the first reliability.
 7. The position detecting apparatusaccording to claim 6, wherein the second correction value is larger thanthe first correction value, and the third correction value is smallerthan the first correction value.
 8. The position detecting apparatusaccording to claim 6, wherein the second correction value is smallerthan the first correction value, and the third correction value islarger than the first correction value.
 9. The position detectingapparatus according to claim 6, wherein the correction value adjustingunit decreases each of a difference between the first correction valueand the second correction value and a difference between the firstcorrection value and the third correction value, when the firstreliability is higher than a predetermined reliability, and wherein thecorrection value adjusting unit increases each of the difference betweenthe first correction value and the second correction value and thedifference between the first correction value and the third correctionvalue, when the first reliability is lower than the predeterminedreliability.
 10. The position detecting apparatus according to claim 1,wherein the second calculating unit calculates the first reliabilitycorresponding to the first correction value and a plurality ofreliabilities corresponding to a plurality of correction valuesdifferent from the first correction value, and wherein the correctionvalue adjusting unit changes the first correction value to the secondcorrection value selected from among the plurality of correction values.11. The position detecting apparatus according to claim 10, wherein thesecond reliability corresponding to the second correction value ishigher than the first reliability.
 12. The position detecting apparatusaccording to claim 1, wherein the second calculating unit calculates thefirst reliability corresponding to the first correction value and thesecond reliability corresponding to the second correction value, andwherein the correction value adjusting unit predicts a third correctionvalue having a third reliability higher than the first reliability basedon the first reliability and the second reliability, and changes thefirst correction value to the third correction value.
 13. The positiondetecting apparatus according to claim 1, wherein the correction valueadjusting unit adjusts the correction value if the correction value iswithin a predetermined threshold range, and does not adjust thecorrection value if the correction value is outside the predeterminedthreshold range.
 14. The position detecting apparatus according to claim1, wherein the correction unit corrects the plurality of periodicsignals based on a plurality of correction values, wherein the secondcalculating unit calculates a plurality of reliabilities, and whereinthe correction value adjusting unit adjusts at least one correctionvalue selected from among the plurality of correction values based onthe plurality of reliabilities.
 15. A lens apparatus comprising: anoptical element; and a position detecting apparatus configured to detecta position of the optical element, wherein the position detecting unitincludes: a signal detecting unit configured to detect a plurality ofperiodic signals relating to a position of an object; a correction unitconfigured to correct the plurality of periodic signals using acorrection value to generate a plurality of correction signals; a firstcalculating unit configured to generate a plurality of displacementsignals based on the plurality of correction signals and to calculatethe position based on the plurality of displacement signals; a secondcalculating unit configured to calculate a reliability based on theplurality of displacement signals; and a correction value adjusting unitconfigured to adjust the correction value based on the reliability,wherein the second calculating unit calculates a first reliabilitycorresponding to a first correction value and a second reliabilitycorresponding to a second correction value, and wherein the correctionvalue adjusting unit changes the first correction value to the secondcorrection value when the second reliability is higher than the firstreliability.
 16. A position detecting method comprising the steps of:detecting a plurality of periodic signals relating to a position of anobject; correcting the plurality of periodic signals using a correctionvalue to generate a plurality of correction signals; generating aplurality of displacement signals based on the plurality of correctionsignals and calculating the position based on the plurality ofdisplacement signals; calculating a reliability based on the pluralityof displacement signals; and adjusting the correction value based on thereliability, wherein the step of calculating the reliability calculatesa first reliability corresponding to a first correction value and asecond reliability corresponding to a second correction value, andwherein the step of adjusting the correction value changes the firstcorrection value to the second correction value when the secondreliability is higher than the first reliability.
 17. A non-transitorycomputer-readable storage medium storing a program for causing acomputer to execute the position detecting method according to claim 16.